<template>
  <view>
    <image src="../../static/images/huangjin/appDownloadBg.png" style="width: 100%;height: 100vh;top: 0;position: fixed;"></image>
    <view class="RegBtn androidBtn u-f-ajc" @click="androidXizai()" hover-class="confirm-active">下载APP</view>
    <!-- <image src="../../static/images/huangjin/android.png" mode="widthFix" class="androidBtn"></image> -->
    <u-mask :show="showModal">
    	<view class="weixin" style="padding: 0rpx 25rpx;">
    		<image src="../../static/images/huangjin/wxLive.png" mode="scaleToFill"></image>
    	</view>
    </u-mask>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        WXStatus: false,
        showModal: false,
      }
    },
    onLoad() {
    	// this.GetReg()
    	let ua = navigator.userAgent.toLowerCase();
    	if (ua.match(/MicroMessenger/i) == "micromessenger") {
    		this.WXStatus=true
    		// return '微信浏览器'
    	} else {
    		this.WXStatus=false
    		// return '普通浏览器'
    	}
    },
    methods: {
      async androidXizai() {
      	// 微信浏览器就打开遮罩
      	if(this.WXStatus){
      		this.showModal =true
      		return
      	}
      	// window.location.href = this.androidRouteUrl
      	// window.location.href = 'https://mylive-god.oss-cn-shanghai.aliyuncs.com/mygodlive/yimai.apk'
      	window.location.href = 'http://xingruiappdownload.oss-cn-beijing.aliyuncs.com/xingbaihui.apk'
        
        if (uni.getSystemInfoSync().platform === 'ios') {
          window.location.href = 'https://www.lanzoui.com/xingruizhubao';
        }
      },
    }
  }
</script>

<style lang="scss">
  page {
    background-color: #FFFFFF !important;
  }
  .RegBtn {
  	padding: 10rpx 0;
  	margin-top: 100rpx;
  	width: 600rpx;
  	height: 90rpx;
  	background: #F93A32;
  	border-radius: 90rpx;
  	color: white;
  }
  .weixin {
  	width: 100%;
  	height:400rpx;
  	position: fixed;
  	top: 300rpx;
  	color: #7a7a7a;
  	padding: 0 30rpx;
  	image{
  		width: 100%;
  		height: 300rpx;
  	}
  	// background:#343434;
  }
  .androidBtn {
    // width: 300rpx;
    position: fixed;
    left: 50%;
    bottom: 350rpx;
    margin-left: -300rpx;
  }
</style>
